<!DOCTYPE html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="contextPath" value="${pageContext.request.contextPath}" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>工作组工资详细页面</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<meta content="width=device-width, initial-scale=1" name="viewport">
<link rel="stylesheet" type="text/css" href="${contextPath}/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="${contextPath}/css/bootstrap-theme.min.css" />
<link rel="stylesheet" type="text/css" href="${contextPath}/css/public.css">
<link href="${contextPath}/css/jquery-ui.min.css" rel="stylesheet">
<link href="${contextPath}/css/jquery-ui.theme.min.css" rel="stylesheet">
<style type="text/css">
	.input-group-addon,.form-control{padding:6px;}
	.ui-datepicker .ui-datepicker-title select{color:#1c94c4}
	.form-btn1{height: 50px;float: left;}
</style>
<script type="text/javascript" src="${contextPath}/js/jquery.min.js"></script>
<script type="text/javascript" src="${contextPath}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${contextPath}/js/common.js"></script>
<script type="text/javascript" src="${contextPath}/js/jquery.ui.core.js"></script>
<script type="text/javascript" src="${contextPath}/js/jquery.ui.widget.js"></script>
<script type="text/javascript" src="${contextPath}/js/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="${contextPath}/js/jquery.ui.datepicker-ch.js"></script>
</head>
<body>
	<div class="container" style="max-width: 1366px">
		<div class="panel panel-default" id="workerSalarList">
			<div class="panel-heading">${model.workGroupName}的工作者工资信息</div>
			<div class="panel-body">
				<form class="form-inline" role="form">
					<div class="col-sm-3" style="width: 175px;">
						<div class="form-group">
							<div class="input-group" style="width: 170px;">
								<div class="input-group-addon">用户名</div>
								<input class="form-control"
									onkeydown="if(event.keyCode==13){return false;}"
									id="userNameCondition" type="text" placeholder="查询用户">
							</div>
						</div>
					</div>
					<div class="btn2" style="float: right;">
						<button type="button" id="searchSalaryBtn" class="btn btn-default">查询</button>
					</div>
				</form>
				<div style="clear: both;"></div>
			</div>
			<table class="table table-striped table-bordered">
				<thead>
					<tr>
						<th width='4%'>序号</th>
						<th width='12%'>姓名</th>
						<th width='12%'>用户名</th>
						<th width='15%'>总标注时间(小时)</th>
						<th width='15%'>已审核时间(小时)</th>
						<th width='15%'>未审核时间(小时)</th>
					</tr>
				</thead>
				<tbody id="workerUploadTime-tbody"></tbody>
			</table>
			<ul class="pagination"></ul>
		</div>

	</div>
	<script type="text/javascript">
		var userNameCondition = "";	
		var dateType1 = ${model.dateType };
		var beginDate1 = "${model.beginDate }";
		var endDate1 = "${model.endDate }";
		var workGroupCode = "${model.workGroupCode }";
		
		$(document).ready(function(){
			workerUploadTimeList();
		});
		/*--------------------------------------点击查询按钮-------------------------------------------------------*/
		$("#searchSalaryBtn").click(function(){
			userNameCondition = $("#userNameCondition").val();
			workerUploadTimeList();
		});
		
		/*----------------------------------------------工作者上传时间列表---------------------------------------------------------------*/
		workerUploadTimeList = function(){
			$.ajax({
				type:'POST',
				data:{"userNameCondition":userNameCondition,"dateType":dateType1,"beginDate":beginDate1,"endDate":endDate1,"workGroupCode":workGroupCode},
				url:'${contextPath}/security/workerUploadTime',
				dataType:'json',
				success:function(data){
					$("#workerUploadTime-tbody").empty();			
					if(data.list == ""){
						$("#workerUploadTime-tbody").empty();
						$("#workerUploadTime-tbody").append("<tr class='text-danger'><td colspan='6'>无内容</td></tr>");
					}else{
						$.each(data.list,function(i,item){ //totleTime, workerId, realname, username, uninspectionTime, inspectedTime
							$("#workerUploadTime-tbody").append(
							"<tr>"+
								"<td>"+(i + 1)+"</td>"+
								"<td>"+item.realname+"</td>"+
								"<td>"+item.username+"</td>"+
								"<td title='约"+item.totleTime.toFixed(2)+"秒'>"+(item.totleTime/3600).toFixed(2)+"</td>"+
								"<td title='约"+item.inspectedTime.toFixed(2)+"秒'>"+(item.inspectedTime/3600).toFixed(2)+"</td>"+
								"<td title='约"+item.uninspectionTime.toFixed(2)+"秒'>"+(item.uninspectionTime/3600).toFixed(2)+"</td>"+
							"</tr>"
							);		
						});
					}
				}
			});
		};
	</script>
</body>
</html>
